1. Field of the Invention
The present invention relates to the field of determining a suspect memory leak, and particularly to an improved method and system for detecting a memory leak.
2. Description of Related Art
A memory leak in a server will cause the available memory and performance of the server to decrease continually, and finally cause the server down due to insufficient memory and unable to respond to any request, bringing about severe damages. In the prior art there are various methods for analyzing memory leaks, but they all analyze the server suspected of having a memory leak to determine whether a memory leak actually occurs and to analyze the root cause thereof, that is, the prior art solutions are based on the precondition that a memory leak has already occurred or is suspected to have already occurred.
As a commonly used method, a server suspected of having a memory leak is identified by an administrator artificially through analyzing the log when the server goes down, and then a technical solution in the prior art is used to analyze the memory leak. However, this method depends too much on the administrator's experience, and especially for application servers deployed in a large scale, picking a suspect application server would be extremely time consuming.
In addition, since a current memory leak analysis method has a very high runtime overhead, and there are a lot of objects and complex relationships among the objects in an application server, the detection and analysis of the memory leak problem are very complex, and the detection of a suspect memory leak cannot be performed during runtime.
Therefore, there is a need for a solution that can free the administrator from the burden of identifying a suspect server artificially, and identify a suspect server during runtime; and there is still room for improvement in the prior art.